package com.evil.common.family.dto;

import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
public class FindByIdReqDTO {

    /**
     * ids
     */
    @NotNull(message = "id cant not null")
    private Long id;

    /**
     * 是否过滤已删除
     */
    @NotNull(message = "filterDeleted cant not null")
    private Boolean filterDeleted;

    /**
     * 是否会话缓存
     */
    @NotNull(message = "cache cant not null")
    private Boolean cache;

    public FindByIdReqDTO() {
    }

    public FindByIdReqDTO(Long id) {
        this.id = id;
        this.filterDeleted = true;
        this.cache = false;
    }

    public FindByIdReqDTO(Long id, Boolean filterDeleted) {
        this.id = id;
        this.filterDeleted = filterDeleted;
        this.cache = false;
    }

    public FindByIdReqDTO(Long id, Boolean filterDeleted, Boolean cache) {
        this.id = id;
        this.filterDeleted = filterDeleted;
        this.cache = cache;
    }
}
